<template>
    <img :src="imageUrl(iconName)" :alt="iconName" class="icon" />
</template>

<script>
export default {
    name: 'Icon',
    props: {
        iconName: {
            type: String,
            required: true
        }
    },
    methods: {

        imageUrl(iconName) {
            return require(`@/assets/icon/${iconName}`);
        }
    }
};
</script>

<style>
.icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}
</style>